package com.wlyuan.index.api.waybill.dto.waybill;

import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author yuanjie
 */
@Data
public class WaybillGoodsDTO implements Serializable {

    @NotNull(message = "物品ID不能为空")
    @ApiModelProperty(value = "物品ID", required = true)
    private Long goodsId;

    @NotNull(message = "数量不能为空")
    @Range(min = 1, max = 99999999, message = "数量最多可输入8位整数")
    @ApiModelProperty(value = "数量", required = true, allowableValues = "range[1,99999999]")
    private Integer quantity;

    @Length(max = 20, message = "批次号最多可输入20个字符")
    @ApiModelProperty(value = "批次号")
    private String batchNo;

    @Length(max = 100, message = "物品备注最多可输入100个字符")
    @ApiModelProperty(value = "备注")
    private String remarks;

    @ApiModelProperty(value = "回传信息")
    private JSONObject echo;
}
